package com.yike.user.api.service;

import com.yike.user.api.service.hystrix.UserFeignHystrix;
import com.yike.user.api.vo.UserVo;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Set;

/**
 * @Author gfs
 * @Date 2020/8/16 9:45
 **/
@FeignClient(value = "user-service", fallback = UserFeignHystrix.class)
public interface UserFeignService {

    @ApiOperation(value = "用户列表")
    @GetMapping("/feign/user/list")
    List<UserVo> list(@RequestParam("userIds") Set<Long> userIds);

    @GetMapping("/feign/user/getUserById")
    UserVo getUserById(@RequestParam("userId") Long userId);
}
